<template>
	<view class="card" v-if="info.real_amount">
		<view class="f14px">{{info.bank_name}}账户</view>
		<view class="f32px pt10">
			<text class="f20px">¥</text>{{info.real_amount}}
		</view>

		<view class="f16px pt5">{{info.status_desc}}</view>
		<view class="f12px pt5 pb5 f-red" v-if="info.fail_reason">{{info.fail_reason}}</view>

		<view class="pt45">
			<u-cell-item style="padding: 6rpx 32rpx;" title="提现金额" :title-style="{color:'#888'}"
				:value-style="{color:'#222'}" :value="'¥'+info.withdraw_amount" :arrow="false"
				:border-bottom="false"></u-cell-item>
			<u-cell-item style="padding: 6rpx 32rpx;" title="综合税费" :title-style="{color:'#888'}"
				:value-style="{color:'#222'}" :value="'¥'+info.fee" :arrow="false" :border-bottom="false"></u-cell-item>
			<u-cell-item style="padding: 6rpx 32rpx;" title="提现时间" :title-style="{color:'#888'}"
				:value-style="{color:'#222'}" :value="info.created_at" :arrow="false"
				:border-bottom="false"></u-cell-item>
			<u-cell-item style="padding: 6rpx 32rpx;" title="提现流水号" :title-style="{color:'#888'}"
				:value-style="{color:'#222'}" :value="info.withdraw_sn" :arrow="false"
				:border-bottom="false"></u-cell-item>
		</view>
	</view>
</template>

<script>
	import * as Api from '@/api/assets/index.js'
	export default {
		data() {
			return {
				id: '',
				info: {
					real_amount: 0,
				}
			};
		},
		methods: {
			async getData() {
				const res = await Api.withdrawDetail(this.id);
				if (res.data) {
					this.info = res.data;
				}
			}
		},
		onLoad(query) {
			this.id = query.id;
			this.getData();
		},
		created() {
			// this.getData();
		}
	}
</script>

<style lang="scss" scoped>
	.card {
		width: 718rpx;
		// min-height: 650rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		box-sizing: border-box;
		text-align: center;
		margin: 32rpx auto;
		padding: 32rpx 0 24rpx;
	}
</style>